home *** CD-ROM | disk | FTP | other *** search
/ ShareWare OnLine 2 / ShareWare OnLine Volume 2 (CMS Software)(1993).iso / os2 / os2cop20.zip / OS2COPY2.CMD < prev    next >
OS/2 REXX Batch file  |  1993-04-06  |  20KB  |  580 lines

  1. /*
  2. ┌───────────────────────────────────────────────────────────────────────┐
  3. │ OS2Copy2.CMD v. 2.01  part 1 of 2.                                    │
  4. │ REXX script to copy OS/2 HPFS or FAT BootManager system,              │
  5. │ from one drive letter to another  eg. from D: to E:,                  │
  6. │ from FAT to FAT, HPFS to HPFS, part 2.                                │
  7. │                                                                       │
  8. │ Documentation is found in the file OS2COPY.DOC                        │
  9. │                                                                       │
  10. │ Copyright (C): John Ståhle                                            │
  11. │                289A Buddinge Hovedgade                                │
  12. │                DK-2880 Bagsværd                                       │
  13. │                Denmark, Europe                                        │
  14. │                Phone +45 44 98 66 18                                  │
  15. │                                                                       │
  16. │ Disclaimer, warning and what not:                                     │
  17. │ !! NO responsibility or any other obligation you can ever think of    │
  18. │    is assumed, honored or anything else.                              │
  19. └───────────────────────────────────────────────────────────────────────┘
  20. */
  21. /*───────────────────────────────────────────────────────────────────────*/
  22.  
  23. Call RxFuncAdd SysLoadFuncs, RexxUtil, SysLoadFuncs
  24. CALL SysLoadFuncs
  25.  
  26. PARSE UPPER Arg all_args
  27.  
  28. HPFSSys = 'HPFS' 
  29. FATSys  = 'FAT'
  30.  
  31. '@ECHO OFF'
  32. 'CLS'
  33. CALL StartMelding
  34.  
  35. CALL HentParametre
  36. IF (FromDrive==ToDrive) THEN DO
  37.    CALL FromSameAsTo
  38.    CALL HentParametre
  39.    IF (FromDrive==ToDrive) THEN DO
  40.       CALL FromSameAsTo
  41.       EXIT
  42.    END
  43.    CALL SysCls
  44. END
  45. ToSubDir   = SUBSTR(FromDrive,1,1)
  46. ToLetter   = SUBSTR(ToDrive,1,1)
  47. ToLocation = ToDrive'\'ToSubDir
  48. FromDrive
  49.  
  50. CALL FindFiler
  51. CALL GetYesNo
  52. CALL GetXCopSw
  53. CALL AskCreate
  54. IF (JaNej \= YesLetter) THEN 'FDISK'
  55. CALL SysCls
  56.  
  57.  
  58. CALL Kopimeddelelse
  59. IF (OK \= YesLetter) THEN DO
  60.    SAY
  61.    SAY "┌────────────────────────────────┐"
  62.    SAY "│ Let us give it one more chance │"
  63.    SAY "└────────────────────────────────┘"
  64.    SAY
  65.    OK = ' '
  66.    CALL Kopimeddelelse
  67.    IF (OK \= YesLetter) THEN DO
  68.       CALL CleanUp
  69.       EXIT
  70.    END
  71. END
  72.  
  73. /* Here goes */
  74.  
  75. CALL DiskFormat
  76. CALL CheckFreeBefore
  77. CALL MakeDirs
  78. CALL PerformXcopy
  79. CALL CopyInitFilesToNewDrive
  80. CALL CopyBinFiles
  81. CALL CopyTextFiles
  82. CALL LineOut(CInitList)
  83. CALL EditInitFiles 
  84. CALL CopyInitFilesToInstall
  85. CALL CopyTextFilesToInstall
  86. CALL LineOut(CInitList)
  87. DROP CInitList
  88.  
  89. CALL Slutmelding
  90. CALL CleanUp
  91.  
  92. EXIT
  93. /*───────────────────────────────────────────────────────────────────────*/
  94.  
  95. GetYesNo:
  96.    YesNo = ' '
  97.    DO WHILE (SubStr(YesNo,2,1) \= '/')
  98.       YesNo = LineIn(YesNoFile)
  99.    END
  100.    YesLetter = SubStr(YesNo,1,1)
  101.    NoLetter  = SubStr(YesNo,3,1)
  102.    IF (YesLetter == ' ') THEN YesLetter = 'Y'
  103.    IF (NoLetter  == ' ') THEN NoLetter  = 'N'
  104.    CALL LineOut(YesNoFile)
  105. RETURN
  106.  
  107. /*.......................................................................*/
  108.  
  109. GetXCopSw:
  110.    XCopSw = ' '
  111.    DO WHILE (SubStr(XCopSw,2,1) \= '/')
  112.       XCopSw = LineIn(XCopSwFile)
  113.    END
  114.    IF (XCopSw == ' ') THEN XCopSw = ' /E /H /T /R /V'
  115.    CALL LineOut(XCopSwFile)
  116. RETURN
  117.  
  118. /*.......................................................................*/
  119. FindFiler:
  120.  
  121.    InitEditFil = 'InitEdit.EXE'
  122.    InitEditExe = SysSearchPath('PATH',InitEditFil)
  123.    IF (InitEditExe=='') then DO
  124.       NoFileName = InitEditFil
  125.       CALL FileNotThere
  126.       EXIT
  127.    END
  128.    
  129.    InitEditList = 'InitEdit.Lst'
  130.    CInitList    = SysSearchPath('PATH',InitEditList)
  131.    IF (CInitList=='') then DO
  132.       NoFileName = InitEditList
  133.       CALL FileNotThere
  134.       EXIT
  135.    END
  136.    InitEditLis2 = SubStr(CInitList,1,LastPos('.',CInitList))'LS2'
  137.    'COPY 'CInitList' 'InitEditLis2
  138.    CInitList    = InitEditLis2
  139.    CInitLis2    = SysSearchPath('PATH',InitEditList)
  140.    
  141.    YesNoFil  = 'YesNo.LNG'
  142.    YesNoFile = SysSearchPath('PATH',YesNoFil)
  143.    IF (YesNoFile=='') then DO
  144.       NoFileName = YesNoFil
  145.       CALL FileNotThere
  146.       EXIT
  147.    END
  148.    
  149.    XCopSwFil  = 'XCopy.Sw'
  150.    XCopSwFile = SysSearchPath('PATH',XCopSwFil)
  151.  
  152. RETURN
  153.  
  154. /*.......................................................................*/
  155.  
  156. HentParametre:
  157.  
  158. ArgNo = 1
  159. IF (word(all_args,ArgNo)=='') THEN DO
  160.   SAY 'OS2Copy <FromDrive>: <ToDrive>:'
  161.   SAY
  162.   SAY ' <FromDrive>:        hard drive with OS/2 installed.'
  163.   SAY 
  164.   SAY ' <ToDrive>:          hard drive OS/2 is to be copied to,'
  165.   SAY '                     REQUIRED in this script.'
  166.   SAY 
  167. END
  168.  
  169. CALL HentFraParametre
  170. CALL HentTilParametre
  171.  
  172. RETURN
  173.  
  174. /*.......................................................................*/
  175.  
  176. HentFraParametre:
  177.    ArgNo     = 1
  178.    k         = SysCurPos()
  179.    FromDrive = word(all_args,ArgNo)
  180.    IF (FromDrive=='') THEN FraDisk = SUBSTR(DIRECTORY(),1,2)
  181.    DO WHILE (FromDrive=='')
  182.       CALL SysCurPos word(k,1), 0
  183.       SAY 'Hard drive to copy OS/2 system FROM (X:) ?'
  184.       CALL SysCurPos word(k,1), 48
  185.       PULL FromDrive
  186.    END
  187.    IF (SUBSTR(FromDrive,2,1) \= ':') THEN FromDrive = FromDrive':'
  188.    
  189. RETURN
  190.  
  191. /*.......................................................................*/
  192.  
  193. HentTilParametre:
  194.    ArgNo   = ArgNo + 1
  195.    ToDrive = word(all_args,ArgNo)
  196.    k=SysCurPos()
  197.    DO WHILE (ToDrive=='')
  198.       CALL SysCurPos word(k,1), 0
  199.       SAY 'Hard drive to copy your OS/2 system TO  (X:) ?'
  200.       PULL ToDrive 
  201.    END
  202.    IF (SUBSTR(ToDrive,2,1) \= ':') THEN ToDrive = ToDrive':'
  203.    
  204. RETURN
  205.  
  206.  
  207. /*.......................................................................*/
  208.  
  209. DiskFormat:
  210.    
  211.    'FDISK /Query |'RXQueue
  212.    FilSysInfo.0 = QUEUED()
  213.    DO i = 1 TO FilSysInfo.0
  214.       PARSE PULL FilSysInfo.i
  215.       IF (SubStr(FilSysInfo.i,19,2)==FromDrive) THEN DO
  216.          IF (SubStr(FilSysInfo.i,30,2)=='07') THEN FromFilSys = HPFSSys
  217.          IF (SubStr(FilSysInfo.i,30,2)=='06') THEN FromFilSys = FATSys
  218.       END
  219.    END
  220.  
  221. 'CLS'
  222. SAY '┌─────────────────────────────────────────────────────────────────────────┐'
  223. SAY '│ If, for some reason, the format does not work: Press Ctrl C to end      │' 
  224. IF (FromFilSys == HPFSSys) THEN DO
  225. SAY "│ and perform format "ToDrive" /FS:"FromFilSys" 'by hand', giving NO label               │"
  226. END
  227. ELSE DO
  228. SAY "│ and perform format "ToDrive" /FS:"FromFilSys" 'by hand', giving NO label                │"
  229. END
  230. SAY '│                                                                         │'
  231. SAY '│ and restart the computer afterwards.                                    │'
  232. SAY '└─────────────────────────────────────────────────────────────────────────┘'
  233. SAY '┌─────────────────────────────────────────────────────────────────────────┐'
  234. SAY '│                                                                         │'
  235. SAY '│ If you answer >  'YesLetter'  <  partition 'ToDrive' will become formatted !!!           │'
  236. SAY '│                                                                         │'
  237. SAY '│   !!! This means, that ALL data on 'ToDrive' is lost !!!                       │'
  238. SAY '│                                                                         │'
  239. SAY '└─────────────────────────────────────────────────────────────────────────┘'
  240. SAY '┌─────────────────────────────────────────────────────────────────────────┐'
  241. SAY '│                                                                         │'
  242. k = SysCurPos()
  243. SAY '│ Are you sure you want 'ToDrive' to become formatted                            │'
  244. SAY '│                                                                         │'
  245. SAY '└─────────────────────────────────────────────────────────────────────────┘'
  246.    JaNej = 'x'
  247.    DO WHILE ((JaNej \= YesLetter) & (JaNej \= NoLetter))
  248.       CALL SysCurPos word(k,1),52
  249.       SAY '('YesNo') ?'
  250.       CALL SysCurPos word(k,1),61
  251.       PULL JaNej
  252.    END
  253.    IF (JaNej \= YesLetter) THEN DO
  254.       CALL CleanUp
  255.       EXIT
  256.    END
  257. SAY
  258. SAY
  259.    'Echo 'JaNej'|Format 'ToDrive' /FS:'FromFilSys' /V:'ToLetter'OS2'FromFilSys
  260. RETURN
  261.  
  262. /*.......................................................................*/
  263.  
  264. CheckFreeBefore:
  265. CALL CheckFree
  266. IF (ToFree < FromUsed) THEN DO
  267.  CALL SysCls
  268.  SAY
  269.  SAY 'Drive 'FromDrive' contains          'FORMAT(FromUsed,8,0)' KB files etc.'
  270.  SAY 'Drive 'ToDrive' has room for only 'FORMAT(ToFree,8,0)' KB'
  271.  SAY 'There is NOT room enough for a copy of 'FromDrive' on 'ToDrive
  272.  SAY
  273.  SAY 'Press CTRL C to stop or'
  274.  'PAUSE'
  275. END
  276. RETURN
  277.  
  278. /*.......................................................................*/
  279.  
  280. CheckFreeAfter:
  281.  
  282. SwapSize = 0
  283. /*   
  284.    SwapFile = Fromdrive'\OS2\SYSTEM\Swapper.Dat'
  285.    RC = SysFileTree(SwapFile,'Swap.','F')
  286.    IF (Swap.0 > 0) THEN DO
  287.       SwapSize = WORD(Swap.1,3)
  288.    END
  289.    ELSE DO
  290.       SwapSize = 4096 * 1024
  291.    END
  292. */   
  293.    InitSize = 0
  294.    FromInis = FromDrive'\OS2\*.INI'
  295.    RC = SysFileTree(FromInis,'InitFiles.','F')
  296.    IF (InitFiles.0 > 0) THEN DO i = 1 TO InitFiles.0
  297.       InitSize = InitSize + WORD(InitFiles.i,3)
  298.    END
  299.    ELSE DO
  300.       InitSize = 1000
  301.    END
  302.    InitSize = (InitSize * 1.2 + SwapSize) /1024
  303.    CALL CheckFree
  304.  IF (ToFree < InitSize) THEN DO
  305.   CALL SysCls
  306.   SAY
  307.   SAY 'Drive 'FromDrive' contains          'FORMAT(InitSize,8,0)' KB init files'
  308.   SAY 'Drive 'ToDrive' has room for only 'FORMAT(ToFree,8,0)' KB'
  309.   SAY 'There is NOT room enough for a copy of 'FromDrive' on 'ToDrive
  310.   SAY
  311.   SAY '┌─────────────────┐'
  312.   SAY '│    Aborting     │'
  313.   SAY '└─────────────────┘'
  314.   CALL CleanUp
  315.   EXIT
  316.  END     
  317. RETURN
  318.  
  319. /*.......................................................................*/
  320.  
  321. CheckFree:
  322.    FromInfo  = SysDriveInfo(FromDrive)
  323.    FromTotal = SUBWORD(FromInfo,3,1)/1024
  324.    FromFree  = SUBWORD(FromInfo,2,1)/1024
  325.    FromUsed  = FromTotal - FromFree
  326.     
  327.    ToInfo    = SysDriveInfo(ToDrive)
  328.    ToFree    = SUBWORD(ToInfo,2,1)/1024
  329. RETURN
  330.  
  331. /*.......................................................................*/
  332.  
  333. PerformXcopy:
  334.    'XCOPY 'FromDrive'\*.* 'ToDrive'\ 'XcopSw' /S /E'
  335. RETURN
  336.  
  337. /*.......................................................................*/
  338.  
  339. CopyInitFilesToNewDrive:
  340. CALL SysCls
  341. SAY '┌─────────────────────────────────────────────────────────────┐'
  342. SAY '│                                                             │'
  343. SAY '│  Now is the time to remove superfluous files on 'ToDrive'          │'
  344. SAY '│  using a different thread                                   │'
  345. SAY '│                                                             │'
  346. SAY '│  Now is also the time to shut down ALL OTHER processes      │'
  347. SAY '│                                                             │'
  348. SAY '│  Do NOT remove the 'ToLocation' subdirectory !                      │'
  349. SAY '│                                                             │'
  350. SAY '└─────────────────────────────────────────────────────────────┘'
  351. 'PAUSE'
  352.    CALL CheckFreeAfter
  353.    CALL MakeDirs
  354.    CALL InitCopyMelding
  355.    InitFil = LineIn(CInitList,1,1)
  356.    DO WHILE InitFil  \=  '>INIT_FILES'
  357.       InitFil = LineIn(CInitList)
  358.    END
  359.    InitFil = LineIn(CInitList)
  360.    DO WHILE ((InitFil \= '>BIN_FILES') & (LEFT(InitFil,1)=='\'))
  361.       IndIni = FromDrive'\OS2'InitFil
  362.       UdIni  = ToLocation||InitFil
  363.       SAY 'Working on 'IndIni
  364.       CALL PerformInitCopy
  365.       InitFil = LineIn(CInitList)
  366.    END
  367. RETURN
  368.  
  369. /* .....................................................................*/
  370.  
  371. /* The basic concept of this is from the REXX online-docs SysIni sample.   */
  372.  
  373. PerformInitCopy:
  374.    IF (SysIni(IndIni,'All:','Progs.') =='') THEN DO i = 1 to Progs.0
  375.       IF (SysIni(IndIni,Progs.i,'All:','Keys.') =='') THEN DO j = 1 to Keys.0
  376.          Val = SysIni(IndIni, Progs.i, Keys.j)
  377.           IF (Val\='') THEN DO
  378.              IF (SysIni(UdIni,Progs.i,Keys.j,Val)=='ERROR:') THEN DO
  379.                 SAY 'Failure setting 'Progs.i' : 'Keys.j
  380.             END
  381.          END
  382.       END
  383.    END
  384. RETURN
  385.  
  386. /* .....................................................................*/
  387.  
  388. CopyInitFilesToInstall:
  389.  
  390. InitFil = LineIn(CInitList,1,1)
  391. DO WHILE InitFil  \=  '>INIT_FILES'
  392.    InitFil = LineIn(CInitList)
  393. END
  394.  
  395. DO WHILE (InitFil \= '>BIN_FILES')
  396.    InitFil = LineIn(CInitList)
  397.    DO WHILE (substr(InitFil,1,1)=='\')
  398.       'XCOPY 'ToDrive'\OS2'InitFil ToDrive'\OS2\INSTALL 'XCopSw
  399.       InitFil = LineIn(CInitList)
  400.    END
  401. END
  402. RETURN
  403.  
  404. /*.......................................................................*/
  405.  
  406. CopyBinFiles:
  407.    DO WHILE (BinFil \= '>TXT_FILES')
  408.       BinFil = LineIn(CInitList)
  409.       DO WHILE (substr(BinFil,1,1)=='\')
  410.          'XCOPY 'FromDrive'\OS2'BinFil ToLocation' 'XCopSw
  411.          'XCOPY 'FromDrive'\OS2'BinFil ToDrive'\OS2 'XCopSw
  412.          BinFil = LineIn(CInitList)
  413.       END
  414.    END
  415. RETURN
  416.  
  417. /*.......................................................................*/
  418.  
  419. CopyTextFiles:
  420.    DO WHILE (TxtFil \= '>>>THE_END')
  421.       TxtFil = LineIn(CInitList)
  422.       DO WHILE (substr(TxtFil,1,1)=='\')
  423.          'XCOPY 'FromDrive||TxtFil' 'ToLocation' 'XCopSw
  424.          TxtFil = LineIn(CInitList)
  425.       END
  426.    END
  427. RETURN
  428.  
  429. /*.......................................................................*/
  430.  
  431. CopyTextFilesToInstall:
  432.    DO WHILE (TxtFil \= '>>>THE_END')
  433.       TxtFil = LineIn(CInitList)
  434.       DO WHILE (substr(TxtFil,1,1)=='\')
  435.          'XCOPY 'ToDrive||TxtFil' 'ToDrive'\OS2\INSTALL 'XCopSw
  436.          TxtFil = LineIn(CInitList)
  437.       END
  438.    END
  439. RETURN
  440.  
  441. /*.......................................................................*/
  442.  
  443. EditInitFiles:
  444.    InitEditExe' 'FromDrive' 'ToDrive' 'CInitLis2' 'InitEditExe
  445. RETURN
  446.  
  447. /*.......................................................................*/
  448.  
  449. CleanUp:
  450.    'Del 'Fromdrive'\Startup.CMD'
  451.    'Copy 'Fromdrive'\StartUp.@#@ 'Fromdrive'\Startup.Cmd' 
  452.    'Del 'Fromdrive'\Startup.@#@'
  453.    'Del 'Todrive'\Startup.CMD'
  454.    'Copy 'ToDrive'\StartUp.@#@ 'ToDrive'\Startup.Cmd'
  455.    'Del 'Todrive'\Startup.@#@'
  456.    'Del 'Fromdrive'\OS2Copy.INI'
  457.    'Del 'Fromdrive'\OS2Copy.ASC'
  458.    'Del 'Todrive'\OS2Copy.INI'
  459.    'Del 'Todrive'\OS2Copy.ASC'
  460. RETURN
  461.  
  462. /*.......................................................................*/
  463.  
  464. StartMelding:
  465. SAY '┌────────────────────────────────────────────────────────────────────────┐'
  466. SAY '│                                                                        │'
  467. SAY '│ OS2Copy2 v.2.01  Copyright (c) 1993.01.19: John Ståhle                │'
  468. SAY '│ This OS2Copy script is placed in the Public Domain                     │'
  469. SAY '│                                                                        │'
  470. SAY '└────────────────────────────────────────────────────────────────────────┘'
  471. SAY '┌────────────────────────────────────────────────────────────────────────┐'
  472. SAY '│                                                                        │'
  473. SAY '│ You will get messages telling that OS2.INI, OS2SYS.INI and SWAPPER.DAT │'
  474. SAY "│ can NOT be copied (this is during the XCOPY part) - don't worry,       │"
  475. SAY '│ these files will be copied and edited later in the process.            │'
  476. SAY '│                                                                        │'
  477. SAY '└────────────────────────────────────────────────────────────────────────┘'
  478. 'PAUSE'
  479. RETURN
  480.  
  481. /*.......................................................................*/
  482.  
  483. InitCopyMelding:
  484. SAY '┌───────────────────────────────────────────────────────────────────────┐'
  485. SAY '│                                                                       │'
  486. SAY '│  Copying .INI files by querying the keys in progress.                 │'
  487. SAY '│                                                                       │'
  488. SAY '└───────────────────────────────────────────────────────────────────────┘'
  489. RETURN
  490.  
  491. /*.......................................................................*/
  492.  
  493. FileNotThere:
  494.    SAY '┌───────────────────────────────────────────────────────────────────┐'
  495.    SAY '│' NoFileName' was >> NOT <<  found in your path'
  496.    SAY '│' NoFileName' is crucial for the success of this procedure'
  497.    SAY '│ !!! Path to 'NoFileName' must be included in your Config.Sys   !!!'
  498.    SAY '│ !!! Path to 'NoFileName' must be included in your Autoexec.Bat !!!'
  499.    SAY '└───────────────────────────────────────────────────────────────────┘'
  500. RETURN
  501.  
  502. /*.......................................................................*/
  503.  
  504. FromSameAsTo:
  505. SAY '┌─────────────────────────────────────────────────────────────────────────┐'
  506. SAY '│                                                                         │'
  507. SAY '│    FromDrive ('FromDrive') is the same as ToDrive ('ToDrive') NO GO!                    │'
  508. SAY '│                                                                         │'
  509. SAY '└─────────────────────────────────────────────────────────────────────────┘'
  510.    'PAUSE'
  511.    CALL SysCls
  512. RETURN
  513.  
  514. /*.......................................................................*/
  515.  
  516. Kopimeddelelse:
  517. SAY '┌───────────────────────────────────────────────────────────────────────┐'
  518. SAY '│                                                                       │'
  519. SAY '│ Copying OS/2 FROM  'FromDrive'                                                 │'
  520. SAY '│ Copying OS/2   TO  'ToDrive'                                                 │'
  521. SAY '│                                                                       │'
  522. k = SysCurPos()
  523. SAY '│ OK ('YesNo') ?                                                            │'
  524. SAY '└───────────────────────────────────────────────────────────────────────┘'
  525. p = SysCurPos()
  526.    DO WHILE ((OK \= YesLetter) & (OK \= NoLetter))
  527.       CALL SysCurPos word(k,1),14
  528.       PULL OK
  529.    END
  530.    CALL SysCurPos word(p,1),0
  531. RETURN
  532.  
  533. /*.......................................................................*/
  534.  
  535. AskCreate:
  536. SAY '┌───────────────────────────────────────────────────────────────────────────┐'
  537. SAY '│                                                                           │'
  538. k = SysCurPos()                                                              
  539. SAY '│ Did you remember to create a partition and insert it in BootManager       │'
  540. SAY '│                                                                           │'
  541. SAY '└───────────────────────────────────────────────────────────────────────────┘'
  542. p = SysCurPos()                                                              
  543.    DO WHILE ((JaNej \= YesLetter) & (JaNej \= NoLetter))
  544.       CALL SysCurPos word(k,1),69
  545.       SAY '('YesNo')?'
  546.       CALL SysCurPos word(k,1),75
  547.       PULL JaNej
  548.    END
  549.    CALL SysCurPos word(p,1),0
  550. RETURN
  551.  
  552. /* .....................................................................*/
  553.  
  554. Slutmelding:
  555. SAY
  556. SAY 'A backup of original files is left in subdirectory 'ToLocation
  557. SAY
  558. SAY 'SYSxxxx: The system cannot find the file specified.'
  559. SAY '              is >>> OK <<<'
  560. SAY 
  561. SAY 'This just tells that originally you did not have no STARTUP.CMD'
  562. SAY
  563. RETURN
  564.  
  565. /*.......................................................................*/
  566.  
  567. MakeDirs:
  568. SAY
  569. SAY 'SYSxxxx: A subdirectory or file 'ToLocation' already exists.'
  570. SAY 'SYSxxxx: A subdirectory or file 'ToDrive'\OS2 already exists.'
  571. SAY
  572. SAY '             are >>>  OK  <<<'
  573. SAY
  574.   
  575. 'MD 'ToLocation
  576. 'MD 'ToDrive'\OS2'
  577. RETURN
  578.  
  579. /*───────────────────────────────────────────────────────────────────────*/
  580.